#include "FileSelector.h"
#include "ui_FileSelector.h"
#include <QFileDialog>

FileSelector::FileSelector(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::FileSelector)
{
    ui->setupUi(this);
}

FileSelector::~FileSelector()
{
    delete ui;
}

QString FileSelector::getLocationsFilename(void)
{
    return ui->locationsBox->text();
}

QString FileSelector::getConnectionsFilename(void)
{
    return ui->connectionsBox->text();
}

void FileSelector::on_browseButton_1_clicked(void)
{
    QString dir = QFileDialog::getOpenFileName(this, "Select the input text file.", "C:/", "Text files (*.txt)");
    ui->locationsBox->setText(dir);
}

void FileSelector::on_browseButton_2_clicked(void)
{
    QString dir = QFileDialog::getOpenFileName(this, "Select the connections text file.", "C:/", "Text files (*.txt)");
    ui->connectionsBox->setText(dir);
}
